package com.tengfei.main.course.service;


import com.tengfei.common.core.domain.PageQuery;
import com.tengfei.common.core.page.TableDataInfo;
import com.tengfei.main.course.domain.bo.ChapterBo;
import com.tengfei.main.course.domain.bo.ChapterResBo;
import com.tengfei.main.course.domain.bo.ChapterVideoBo;
import com.tengfei.main.course.domain.bo.VideoQuBo;
import com.tengfei.main.course.domain.vo.ChapterVideoVo;
import com.tengfei.main.course.domain.vo.ChapterVo;
import com.tengfei.main.course.domain.vo.ResVo;
import com.tengfei.main.course.domain.vo.VideoQuVo;
import com.tengfei.main.question.domain.vo.ObjectiveVo;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * 章节Service接口
 *
 * @author tengfei
 * @date 2022-07-27
 */
public interface IChapterService {

    /**
     * 查询章节
     */
    ChapterVo queryById(Long chapterId);

    /**
     * 查询章节列表
     */
    TableDataInfo<ChapterVo> queryPageList(Long courseId, PageQuery pageQuery);

    /**
     * 查询章节列表
     */
    List<ChapterVo> queryList(ChapterBo bo);

    /**
     * 修改章节
     */
    Boolean insertByBo(ChapterBo bo);

    /**
     * 修改章节
     */
    Boolean updateByBo(ChapterBo bo);

    /**
     * 校验并批量删除章节信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids);

    Boolean addVideo(List<ChapterVideoBo> bos);

    Boolean deleteVideoByChapterIds(List<Long> ids);

    int editVideo(ChapterVideoBo bo);

    TableDataInfo<ChapterVideoVo> queryVideoList(Long chapterId, PageQuery pageQuery);

    Boolean addRes(List<ChapterResBo> bos);

    int editRes(Long resId, String resName);

    Boolean deleteResByChapterIds(List<Long> ids);

    TableDataInfo<ResVo> queryResList(Long chapterId, PageQuery pageQuery);

    List<Map<String, Object>> querySimplePageList(Long courseId);

    ChapterVideoVo queryVideo(Long chapterId, Long videoId);

    ResVo queryResById(Long resId);

    List<VideoQuVo> queryVideoBindQuList(Long id);

    TableDataInfo<ObjectiveVo> queryVideoUnBindQuList(VideoQuBo bo, PageQuery pageQuery);

    boolean videoDelQu(Long id, Long objId);

    boolean videoAddQu(Long id, Long objId, Integer second);
}
